package com.liming.common.pojo.dto.order.user;

import com.liming.common.pojo.dto.order.OrderItemDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * 用户下单请求参数
 *
 * @author liming
 * @date 2025/2/5
 */
@Data
@Schema(description = "用户下单参数")
public class UserOrderDTO {

    @Schema(description = "购物车下单？", requiredMode = Schema.RequiredMode.REQUIRED)
    private Boolean cart;

    @Schema(description = "用户收货地址ID", requiredMode = Schema.RequiredMode.AUTO)
    private Long userAddressId;

    @Schema(description = "优惠券ID", requiredMode = Schema.RequiredMode.AUTO)
    private Long couponId;

    @Schema(description = "优惠券名称", requiredMode = Schema.RequiredMode.AUTO)
    private String couponName;

    @Schema(description = "订单真实金额（使用优惠券后）", requiredMode = Schema.RequiredMode.AUTO)
    private BigDecimal realAmount;

    @Schema(description = "订单总金额", requiredMode = Schema.RequiredMode.AUTO)
    private BigDecimal totalAmount;

    @Schema(description = "备注", requiredMode = Schema.RequiredMode.AUTO)
    private String remark;

    @Schema(description = "是否自提", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer pickup;

    @Schema(description = "自提点ID", requiredMode = Schema.RequiredMode.AUTO)
    private Long pickupPointId;

    @Schema(description = "自提点名称", requiredMode = Schema.RequiredMode.AUTO)
    private String pickupPointName;

    @Schema(description = "订单中的商品IDS", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<OrderItemDTO> orderItemList;
}
